<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use kucha\ueditor\UEditor;
/* @var $this yii\web\View */
/* @var $model backend\models\Article */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="col-sm-12">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>请填写以下信息 <small>按照提示要求填写内容</small></h5>
        </div>
        <div class="ibox-content">
       
        <?php $form = ActiveForm::begin(); ?>

        <?= $form->field($model, 'cat_id')->dropDownList(\backend\models\Category::find()->select('cat_name')->indexBy('cat_id')->column()) ?>
    
        <?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>
    
        <?= $form->field($model, 'user_id')->textInput() ?>
        
        <?= $form->field($model, 'keywords')->textInput(['maxlength' => true]) ?>
    
        <?= $form->field($model, 'article_type')->textInput() ?>
    
        <?= $form->field($model, 'status')->dropDownList([0 => '待审核', 1 => '正常']) ?>
    
        <?= $form->field($model, 'cover')->textInput(['maxlength' => true]) ?>
    
       
    
        <?= $form->field($model, 'source')->textInput(['maxlength' => true]) ?>
        <?php  echo $form->field($model,'description')->widget('kucha\ueditor\UEditor',[
    'clientOptions' => [
        //编辑区域大小
        'initialFrameHeight' => '120',
        //设置语言
        'lang' =>'zh-cn', 
        'toolbars' => [[
            'fullscreen', 'source', '|', 'undo', 'redo', '|',
            'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
            'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
            'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
            'directionalityltr', 'directionalityrtl', 'indent', '|',
            'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
            'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
            'simpleupload', 'insertimage', 'emotion', 'scrawl', 'insertvideo', 'music', 'attachment', 'map','insertframe','webapp', 'pagebreak', 'template', 'background', '|',
            'horizontal', 'date', 'time', 'spechars', 'snapscreen', 'wordimage', '|',
            'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
            'print', 'preview', 'searchreplace', 'help', 'drafts'
        ]]
        ]
]);
        ?>
         <?= $form->field($model, 'content')->textarea() ?>
        <div class="form-group">
            <?= Html::submitButton($model->isNewRecord ? '创建' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
        </div>
    
        <?php ActiveForm::end(); ?>
        </div>
    </div>
</div>
            
            
            
            
            

